package com.junhao.springes.dao;

/**
 * @Author Lee
 * @Date 2021/12/20
 * @Description
 */



import com.junhao.springes.entity.User;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * es 和 jpa  等用法差不多

 */
public interface UserRepository extends ElasticsearchRepository<User, Long> {

//    和jpa 一样的

    public List<User> findByUserNameLike(String userName);

    List<User> findAllByAddress(String address);


}


